Skip to content

Fixed HandView and ItemPhysics rotations accumulating every frame - #6854

Open
dekrom wants to merge 1 commit into
MeteorDevelopment:masterfrom
dekrom:fix/handview-itemphysics-rotation
Open

dekrom wants to merge 1 commit into
MeteorDevelopment:masterfrom
dekrom:fix/handview-itemphysics-rotation

Conversation

@dekrom

@dekrom dekrom commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Bug fix
  • New feature

Description

Both modules pass a shared Matrix4f field to Axis.rotateDegrees(Matrix4f, float). On 26.3 that
rotates the matrix it's given in place (matrix.rotateX(...)) and returns it, and the field is
never reset, so every call multiplies onto all the previous ones and mulPose applies the growing
product.

With any non-zero rotation in HandView the held item keeps turning. In ItemPhysics the 90 degree
flat rotation and the random ones pile up across items and frames, and the items end up rotated
out of view.

PoseStack#rotateDegrees(Axis, float) applies the one rotation to the pose and normal, which is
what the old mulPose(Axis.XP.rotationDegrees(...)) did.

Related issues

Possibly what #6788 was showing (closed by the bot, it was only a video).

How Has This Been Tested?

HandView with rotation 0 20 0: before, two screenshots two seconds apart had the rocket at
different angles, after it stays where it is. ItemPhysics: before, dropped items only showed
their shadow, after they lie flat and stay still.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant